import requests


class LoginApi():
    def __init__(self):
        self.url_verify = "http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify&r=0.8972131659952187"
        self.url_login = "http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login&t=0.43176122641230474"
        self.headers = {"Content-Type": "application/x-www-form-urlencoded"}

    def login(self, my_session, req_data):
        my_session.get(url=self.url_verify)
        resp = my_session.post(url=self.url_login, headers=self.headers, data=req_data)
        return resp




# import requests
# class Login():
#     def __init__(self):
#         self.url_verify=
#         self.url_login=
#         self.headers=
#
#     def login(self,my_session,req_data):
#         my_session.get(url=self.url_verify)
#         resp= my_session.post(url=self.url_login,headers=self.headers,data=req_data)
#         return resp
#
# import requests
# class Login():
#     def __init__(self):
#         self.url_verify=
#         self.url_login=
#         self.headers=
#
#     def login(self,my_session,req_data):
#         my_session.get(url=self.url_verify)
#         resp= my_session.post(url=self.url_login,headers=self.headers,data=req_data)
#         return resp
#
# import requests
# class Login():
#     def __init__(self):
#         self.url_verify=
#         self.url_login=
#         self.headers=
#     def login(self,my_session,req_data):
#         my_session.get(url=self.url_verify)
#         resp=my_session.post(url=self.url_login,headers=self.headers,data=req_data)
#         return resp
#
# import requests
# class Login():
#     def __init__(self):
#         self.url_verify=
#         self.url_login=
#         self.headers=
#     def login(self,my_session,req_data):
#         my_session.get(url=self.url_verify)
#         resp= my_session.post(url=self.url_login,headers=self.headers,data=req_data)
#         return resp
